package com.hmdp.utils;

/**
 * ClassName: ILock
 * Package:
 * Description:
 *
 * @Author pupu
 * @Create 2025/9/17 23:40
 * @Version 1.0
 */
public interface ILock {

    /**
     * 尝试获取锁
     * @param timeoutSec 锁持有的超时时间，过期后自动释放
     * @return
     */
    boolean tryLock(long timeoutSec);

    void unlock();
}
